
function getWinnerList(recordList){
    //先筛选出比赛前3名分数
    let memberList = [];
    let record1 = null;
    let record2 = null ,record3 = null;
    let records =  [];
    for(let i = 0 ; i< recordList.length; i++){
        let r = recordList[i];
        if(r.winScore <= 0 ){
            continue;
        }

        if(!record1 || r.winScore > record1.winScore){
            if(record1){
                record2 = record1;
                records["2"] = record2;
            }
            record1 = r;
            records["1"] = record1;
        }else if(!record2 || r.winScore > record2.winScore){
            if(record2){
                record3 = record2;
                records["3"] = record3;
            }
            record2 = r;
            records["2"] = record2;
        }else if(!record3 || r.winScore > record3.winScore){
            record3 = r;
            records["3"] = record3;
        }
    }
    for(let i in records) {
        for(let j in recordList){
            let r = recordList[j];
            if(r.winScore <= 0 ){
                continue;
            }
            if(r.winScore === records[i].winScore){
                r.sort = i;
                memberList.push(r);
            }
        }
    }
    return memberList;
}


var  s={"data":[{"roomID":"657624","gameType":"fkniuniu17","uid":"101258","winScore":60,"roomTs":1571653738964,
        "clubID":"19800616","juType":"1","unionID":"","tsDate":"20191021","juShu":3,"name":"喵喵官网直充",
        "headUrl":"http://thirdwx.qlogo.cn/mmopen/vi_32/iaP7nB9ZQX3ciayJNca1EibTohv74ibfIcwxeGPC3FUWPHZVfotkr5eibF5y8G9CtavaxAtich265EPMCj7yicFcjMmKg/132",
        "winName":"微脉-编程猫猫教程","winUid":100833},{"roomID":"657624","gameType":"fkniuniu17","uid":"101256","winScore":75,
        "roomTs":1571653738964,"clubID":"19800616","juType":"1","unionID":"","tsDate":"20191021","juShu":3,
        "name":"dia","headUrl":"http://thirdwx.qlogo.cn/mmopen/vi_32/ujaIw2jobTUHrZUX3ibq9uFxjAEtSpgNkAiaIpB7qAPgnxM4lBotkmu49I6cAE77JPocJeibcOZXlIr0LibrgEY2RA/132",
        "winName":"微脉-编程猫猫教程","winUid":100833},{"roomID":"657624","gameType":"fkniuniu17","uid":"101253","winScore":-260,"roomTs":1571653738964,
        "clubID":"19800616","juType":"1","unionID":"","tsDate":"20191021","juShu":3,
        "name":"喵喵阿新","headUrl":"http://thirdwx.qlogo.cn/mmopen/vi_32/yBYWjaKBhY8m3NmQ6l51LicFQwapAvR3Uo4aXMEDNU8t1MrOkO4A2xvXgibNDkrm93cI1KYPRfjGmvbjpvgnqiceA/132",
        "winName":"微脉-编程猫猫教程","winUid":100833},{"roomID":"657624","gameType":"fkniuniu17","uid":"100833","winScore":125,"roomTs":1571653738964,
        "clubID":"19800616","juType":"1","unionID":"","tsDate":"20191021","juShu":3,"name":"微脉-编程猫猫教程",
        "headUrl":"http://thirdwx.qlogo.cn/mmopen/vi_32/O5BVJdsM5OmMky1TUllMJw5oreD60IkbpsTXR2WZhGRkXYicMlbLibghkPfmo67CDWictCKFU5NUibrexIBGbOeWGA/132",
        "winName":"微脉-编程猫猫教程","winUid":100833}]}

var   ss=getWinnerList(s.data);

